<template>
	<!-- 消防维保交接清单 -->
	<view class="">
		<view class="files">
			<view class="tabs">
				<fui-list bottomBorder title="基本信息">
					<view class="tab">

						<fui-list-cell>
							<text>登记人</text>
							<text class="fui-text__explain">{{inspectionStaff.name}}</text>
						</fui-list-cell>

						<fui-list-cell>
							<text>时间</text>
							<text class="fui-text__explain">{{inspectionStaff.data}}</text>
						</fui-list-cell>

					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容1">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c1" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c1" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c1" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c1" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容2">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c2" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c2" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c2" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c2" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容3">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c3" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c3" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c3" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c3" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容4">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c4" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c4" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c4" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c4" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容5">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c5" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c5" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c5" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c5" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容6">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c6" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c6" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c6" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c6" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容7">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c7" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c7" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c7" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c7" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容8">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c8" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c8" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c8" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c8" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容9">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c9" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c9" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c9" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c9" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容10">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c10" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c10" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c10" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c10" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容11">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c11" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c11" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c11" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c11" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="交接内容12">
					<view class="tab">
						<fui-input placeholder="请输入物品" v-model="ops.c12" label="物品" textAlign="right"></fui-input>
						<fui-input placeholder="请输入单位" v-model="opsone.c12" label="单位" textAlign="right"></fui-input>
						<fui-input placeholder="请输入数量" v-model="opstow.c12" label="数量" textAlign="right"></fui-input>
						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="opsfour.c12" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>

				<fui-list bottomBorder title="其他">
					<view class="tab">
						<fui-input placeholder="请输入移交单位" required v-model="ops.c16" label="移交单位"
							textAlign="right"></fui-input>
						<fui-input placeholder="请输入移交单位责任人" required v-model="ops.c13" label="责任人"
							textAlign="right"></fui-input>

						<fui-input placeholder="请输入移接收单位" required v-model="ops.c17" label="移接收单位"
							textAlign="right"></fui-input>
						<fui-input placeholder="请输入移交收单位责任人" required v-model="ops.c14" label="责任人"
							textAlign="right"></fui-input>

						<fui-input readonly label="备注" textAlign="right"></fui-input>
						<u--textarea v-model="ops.c15" placeholder="请输入备注" count maxlength="250"></u--textarea>
					</view>
				</fui-list>



			</view>



			<view class="tab_ops">
				<!-- 	<view style="width: 100%; display: flex; justify-content: space-between;">
					<fui-button btnSize="small" >巡查人员签字</fui-button>
					<fui-button btnSize="small"  >安全主管签字</fui-button>
				</view> -->
				<view style="padding-top: 40rpx;">
					<fui-button @click="submit" type="success">提交</fui-button>
				</view>
			</view>
			<view>
				<u-picker @confirm="onOpsOne" @cancel="showOpsOne = !showOpsOne" :show="showOpsOne"
					:columns="columnsOne"></u-picker>
			</view>
			<view>
				<u-datetime-picker :minDate="minDate" :maxDate="maxDate" :formatter="formatter" @confirm="onTime"
					@cancel="showTime =!showTime" :show="showTime" mode="datetime"></u-datetime-picker>
			</view>
		</view>
	</view>
</template>

<script>
	import moment, {
		duration
	} from "moment"
	import {
		BASE_IP
	} from '@/common/http/url.js'
	// import test from "../../../uni_modules/uview-plus/libs/function/test"
	// import text from "../../../uni_modules/uview-plus/libs/config/props/text"
	import tools from "@/tools/tools.js"
	export default {
		name: "buildingFireProtection",
		data() {
			return {
				user: "",
				inspectionStaff: {
					name: "",
					data: "",
					time: ""
				},
				v1: "",
				v2: "",
				columnsOne: [
					['干粉灭火器', '推车式灭火器', '消防沙箱', '防毒面具', '防护服', '应急照明', '电工器材', '急救箱及药品', '应急通讯设备', '泄漏吸附材料', '堵漏材料']
				],
				showOpsOne: false,
				showTime: false,
				regime: "",
				year: "",
				month: "",
				day: "",
				ops: {
					c1: "", //消防设施名称
					c2: "", //部门
					c3: "", //设置位置
					c4: "", //数量
					c5: "", //器材维护保养状况
					c6: "", //责任人
					c7: "", //备注
					c8: "",
					c9: "",
					c10: "",
					c11: "",
					c12: "",
					c13: "",
					c14: "",
					c15: "",
					c16: "",
					c17: ""

				},
				opsone: {
					c1: "", //消防设施名称
					c2: "", //部门
					c3: "", //设置位置
					c4: "", //数量
					c5: "", //器材维护保养状况
					c6: "", //责任人
					c7: "", //备注
					c8: "",
					c9: "",
					c10: "",
					c11: "",
					c12: "",
					c13: "",
					c14: "",
					c15: ""
				},
				opstow: {
					c1: "", //消防设施名称
					c2: "", //部门
					c3: "", //设置位置
					c4: "", //数量
					c5: "", //器材维护保养状况
					c6: "", //责任人
					c7: "", //备注
					c8: "",
					c9: "",
					c10: "",
					c11: "",
					c12: "",
					c13: "",
					c14: "",
					c15: ""
				},
				opsfour: {
					c1: "", //消防设施名称
					c2: "", //部门
					c3: "", //设置位置
					c4: "", //数量
					c5: "", //器材维护保养状况
					c6: "", //责任人
					c7: "", //备注
					c8: "",
					c9: "",
					c10: "",
					c11: "",
					c12: "",
					c13: "",
					c14: "",
					c15: ""
				},
				time: "",
				index: 0,
				minDate: null,
				maxDate: null,
				tid: 0,
				isSubmit: false,
				preset: ""
			}
		},
		mounted() {
			this.calculateMinMaxDates();
		},
		methods: {
			/**
			 * 
			 * @param {Object} path 转入要签字的路径
			 */
			onSignatures(path) {
				let user = uni.getStorageSync("user")
				if (user.signature == "" || user.signature == undefined || user.signature == null) {
					uni.showModal({
						title: "提示",
						content: "用户未上传签名请前往“预设功能-添加操作员-输入账号-添加签名”，如果已添加操作员上传签名即可",
						showCancel: false,
						success: (res) => {
							if (res.confirm) {
								return
							}
						}
					})
					return
				}
				let docPath = path
				let url = BASE_IP + user.signature
				tools.upSignatures(path, user.signature)
				// console.log(url)
				// let _this = this
				// uni.downloadFile({ //下载
				// 	url: url, //图片下载地址
				// 	success: res => {
				// 		if (res.statusCode === 200) {
				// 			uni.saveFile({
				// 				tempFilePath: res.tempFilePath,
				// 				success: (r) => {
				// 					console.log(r)
				// 					_this.upSignatures(r.savedFilePath, docPath)
				// 				}
				// 			})
				// 		}
				// 	}
				// });
			},
			/** 签字函数
			 * @param {Object} filePath 签字图片
			 * @param {Object} docPath  要签字的文档
			 */
			upSignatures(filePath, docPath) {
				console.log(filePath, docPath)
				let user = uni.getStorageSync("user")
				let url = BASE_IP + "pc/regulatory/signature/word"
				uni.uploadFile({
					header: {
						"Authorization": user.token,
					},
					name: "file",
					url: url,
					formData: {
						"unitId": user.unitId,
						"path": docPath
					},
					filePath: filePath,
					success: (res) => {
						if (res.statusCode == 500) {
							uni.showToast({
								title: "上传失败",
								icon: "error"
							})
							return
						}
					},
					fail: (res) => {
						uni.showToast({
							title: "上传失败,请重试",
							icon: "error"
						})
					}
				})
			},
			/**
			 * 盖章
			 * @param {Object} path 转入要盖章的文件路径
			 */
			onSeal(path) {
				let pralldata = uni.getStorageSync("pralldata")
				// console.log(pralldata)
				let docPath = path
				if (pralldata.unitFireSeal == "" || pralldata.unitFireSeal == undefined) {
					uni.showModal({
						title: "提示",
						content: "单位未上传消防专用章",
						showCancel: false,
						success: (res) => {
							if (res.confirm) {
								return
							}
						}
					})
					return
				}
				let url = BASE_IP + pralldata.unitFireSeal
				tools.upLoadSeal(path, pralldata.unitFireSeal)
				// console.log(url)
				// uni.downloadFile({ //下载
				// 	url: url, //图片下载地址
				// 	success: res => {
				// 		if (res.statusCode === 200) {
				// 			uni.saveFile({
				// 				tempFilePath: res.tempFilePath,
				// 				success: (r) => {
				// 					// console.log(r)
				// 					this.upLoadSeal(r.savedFilePath, docPath)
				// 				}
				// 			})
				// 		}
				// 	}
				// });
			},
			/** 盖章函数
			 * @param {Object} filePath 印章图片
			 * @param {Object} docPath  要盖章的文档
			 */
			upLoadSeal(filePath, docPath) {
				let user = uni.getStorageSync("user")
				let url = BASE_IP + "pc/regulatory/update/word"
				uni.uploadFile({
					header: {
						"Authorization": user.token,
					},
					name: "file",
					url: url,
					formData: {
						"unitId": user.unitId,
						"path": docPath
					},
					filePath: filePath,
					success: (res) => {
						// console.log(res)
						if (res.statusCode == 500) {
							uni.showToast({
								title: "盖章失败",
								icon: "error"
							})
							return
						}
						if (res.statusCode == 404) {
							uni.showToast({
								title: "盖章失败",
								icon: "error"
							})
							return
						}
					},
					fail: (res) => {
						uni.showToast({
							title: "盖章失败,请重试",
							icon: "error"
						})
					}
				})
			},
			onSelectTime(index) {
				this.tid = index
				this.showTime = !this.showTime
			},
			calculateMinMaxDates() {
				const today = moment().startOf("day");
				const minDate = today.clone().subtract(60, "days");
				const maxDate = today.clone().startOf("day");

				this.minDate = minDate.valueOf();
				this.maxDate = maxDate.valueOf();
			},
			formatter(type, value) {
				if (type === 'year') {
					return `${value}年`
				}
				if (type === 'month') {
					return `${value}月`
				}
				if (type === 'day') {
					return `${value}日`
				}
				if (type === 'hour') {
					return `${value}时`;
				}
				if (type === 'minute') {
					return `${value}分`;
				}
				return value
			},
			onTime(res) {
				const timestamp = res.value
				const formattedDateTime = moment(timestamp).format("YYYY-MM-DD HH:mm:ss");
				switch (this.tid) {
					case 1: {
						this.opsfive.c3 = formattedDateTime
						break
					}
					case 2: {
						this.opsfive.c6 = formattedDateTime
						break
					}
				}
				this.showTime = !this.showTime
				// console.log(formattedDateTime)
			},
			onShowOps(index) {
				this.index = index
				this.showOpsOne = !this.showOpsOne
			},
			onOpsOne(res) {
				// this.situation = res.value[0]
				// console.log(res)
				switch (this.index) {
					case 1: {
						this.ops.c1 = res.value[0]
						break
					}
					case 2: {
						this.opsone.c1 = res.value[0]
						break
					}
					case 3: {
						this.opstow.c1 = res.value[0]
						break
					}

				}
				// this.faultSituation.c9 = res.value[0]
				this.showOpsOne = !this.showOpsOne
			},
			submit() {

				if (this.isSubmit) {
					uni.showToast({
						title: "请勿重复提交",
						icon: "error"
					})
					return
				}



				

				let url = BASE_IP + "pc/record/record/fire/fireFireProtectionMaintenanceTransferlist"

				let classifyId = this.regime.classifyId
				// console.log(this.regime)
				let user = uni.getStorageSync("user")

				if (this.ops.c16 == "") {
					uni.showToast({
						title: "交移单位未填",
						icon: "error"
					})
					return
				}
				if (this.ops.c15 == "") {
					this.ops.c15 = "无"
				}



				if (this.ops.c17 == "") {
					uni.showToast({
						title: "交接单位未填",
						icon: "error"
					})
					return
				}
				if (this.ops.c13 == "") {
					uni.showToast({
						title: "责任人未填",
						icon: "error"
					})
					return
				}

				if (this.ops.c14 == "") {
					uni.showToast({
						title: "责任人未填",
						icon: "error"
					})
					return
				}


				for (var i = 1; i <= 12; i++) {
					var propName = "c" + i;
					if (this.ops[propName] == "") {
						this.ops[propName] = "无";
					}
				}


				for (var i = 1; i <= 12; i++) {
					var propName = "c" + i;
					if (this.opsone[propName] == "") {
						this.opsone[propName] = "无";
					}
				}

				for (var i = 1; i <= 12; i++) {
					var propName = "c" + i;
					if (this.opstow[propName] == "") {
						this.opstow[propName] = "无";
					}
				}

				for (var i = 1; i <= 12; i++) {
					var propName = "c" + i;
					console.log(propName)
					if (this.opsfour[propName] == "") {
						this.opsfour[propName] = "无";
					}
				}






				let json1 = {
					yer: this.year,
					mot: this.month,
					day: this.day,
					a1: this.ops.c1,
					a2: this.ops.c2,
					a3: this.ops.c3,
					a4: this.ops.c4,
					a5: this.ops.c5,
					a6: this.ops.c6,
					a7: this.ops.c7,
					a8: this.ops.c8,
					a9: this.ops.c9,
					a10: this.ops.c10,
					a11: this.ops.c11,
					a12: this.ops.c12,
					a13: this.ops.c13,
					a14: this.ops.c14,
					a15: this.ops.c15,
					a16: this.ops.c16,
					a17: this.ops.c17,

					c1: this.opsone.c1,
					c2: this.opsone.c2,
					c3: this.opsone.c3,
					c4: this.opsone.c4,
					c5: this.opsone.c5,
					c6: this.opsone.c6,
					c7: this.opsone.c7,
					c8: this.opsone.c8,
					c9: this.opsone.c9,
					c10: this.opsone.c10,
					c11: this.opsone.c11,
					c12: this.opsone.c12,

					b1: this.opstow.c1,
					b2: this.opstow.c2,
					b3: this.opstow.c3,
					b4: this.opstow.c4,
					b5: this.opstow.c5,
					b6: this.opstow.c6,
					b7: this.opstow.c7,
					b8: this.opstow.c8,
					b9: this.opstow.c9,
					b10: this.opstow.c10,
					b11: this.opstow.c11,
					b12: this.opstow.c12,

					d1: this.opsfour.c1,
					d2: this.opsfour.c2,
					d3: this.opsfour.c3,
					d4: this.opsfour.c4,
					d5: this.opsfour.c5,
					d6: this.opsfour.c6,
					d7: this.opsfour.c7,
					d8: this.opsfour.c8,
					d9: this.opsfour.c9,
					d10: this.opsfour.c10,
					d11: this.opsfour.c11,
					d12: this.opsfour.c12,

				}
				
				let flag_storage = true
				// let user = uni.getStorageSync("user")
				if (user.signature == "" || user.signature == undefined || user.signature == null) {
					uni.showModal({
						title: "提示",
						content: "用户未上传签名请前往“预设功能-添加操作员-输入账号-添加签名”，如果已添加操作员上传签名即可",
						showCancel: false,
						success: (res) => {
							if (res.confirm) {
								flag_storage = false
								uni.navigateTo({
									url: "/pages/preinstall/preinstall"
								})
								return
							}
						}
					})
					return
				}
				
				if (!flag_storage) {
					return
				}
				
				let pralldata = this.preset
				console.log(pralldata)
				let falg_seal = true
				if (pralldata.unitFireSeal == "" || pralldata.unitFireSeal == undefined) {
					uni.showModal({
						title: "提示",
						content: "单位未上传消防专用章,请前往“预设功能-单位消防专用章”上传",
						showCancel: false,
						success: (res) => {
							if (res.confirm) {
								falg_seal = false
								uni.navigateTo({
									url: "/pages/preinstall/preinstall"
								})
								return
							}
						}
					})
					return
				}
				
				if (!falg_seal) {
					return
				}

				console.log(JSON.stringify(json1))
				uni.showLoading({
					title: "正在提交"
				})
				
				this.isSubmit = !this.isSubmit
				uni.request({
					url: url,
					header: {
						"Authorization": user.token,
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					data: {
						unitId: user.unitId,
						name: user.nickName,
						classifyId: classifyId,
						json: JSON.stringify(json1),
						uuid : user.uuid
					},
					method: "POST",
					success: (res) => {
						console.log(res)

						if (res.statusCode == 200) {

							uni.showToast({
								title: "上传成功",
								icon: "success"
							})
							// this.onSeal(res.data.path)
							// this.onSignatures(res.data.path)
							setTimeout((r) => {
								uni.navigateBack({
									delta: 1,
									success: function() {
										const pages = getCurrentPages(); //获取当前页面栈
										const prevPage = pages[pages.length -
											1]; //获取上一个页面实例对象
										prevPage.getCollapseDatas(); //调用上一个页面的onLoad方法
									}
								});
							}, 1500)
							return
						}

						if (res.statusCode == 500) {
							uni.showToast({
								title: "上传失败",
								icon: "error"
							})
							this.isSubmit = !this.isSubmit
							return
						}
						if (res.statusCode == 404) {
							uni.showToast({
								title: "上传失败",
								icon: "error"
							})
							this.isSubmit = !this.isSubmit
							return
						}
					},
					fail: (res) => {
						uni.showToast({
							title: "服务器错误",
							icon: "error"
						})
						this.isSubmit = !this.isSubmit
					}
				})
				this.isSubmit = !this.isSubmit
			},
			getPrall() { //获取预设功能对象数据
			let pralldata = uni.getStorageSync("pralldata")
			this.preset = pralldata
				// let user = uni.getStorageSync("user")
				// let url = BASE_IP + "pc/presetfunction/find/presetFunction/" + user.unitId + "/" + user.uuid
				// uni.request({
				// 	header: {
				// 		"Authorization": user.token,
				// 	},
				// 	url: url,
				// 	success: (res) => {
				// 		this.preset = res.data
				// 	},
				// 	fail: (res) => {
				// 		// console.log("请求失败：", res)
				// 	}
				// })
			}
		},
		onLoad(ops) {
			uni.setNavigationBarTitle({
				title: "消防维保交接清单"
			})
			this.getPrall()
			let user = uni.getStorageSync("user")
			// console.log(user)
			this.regime = JSON.parse(ops.regime)
			// console.log(this.regime)
			this.inspectionStaff.name = user.nickName

			const currentDate = moment();
			const year = currentDate.year();
			const month = currentDate.month() + 1;
			const day = currentDate.date();
			this.year = year
			this.month = month + "月"
			this.day = day
			this.inspectionStaff.data = year + "-" + month + "-" + day
			let pralldata = uni.getStorageSync("pralldata")
			this.inspectionStaff.time = pralldata.operatingTimeStart + " - " + pralldata.operatingTimeEnd
			const currentTime = moment().format("HH:mm");
			this.time = currentTime

			// console.log("获取当前时间：", currentTime);
		}
	}
</script>

<style>
	page {
		background-color: #F1F4FA;
	}

	.tabs {
		width: 95%;
		margin: auto;
	}

	.tab {
		width: 100%;
		background-color: white;
		border-radius: 8px;
		/* margin: auto; */
		box-shadow: 1px 1px 10px #DCDFE6;
		padding-top: 10rpx;
		padding-bottom: 20rpx;
	}

	.fui-text__explain {
		font-size: 14px;
		color: #606266;
	}

	.tab_ops {
		padding: 40rpx;
		padding: 40rpx;
	}
</style>